package com.hlw.dao;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.hlw.entity.Role;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author Mht
 * @since 2020-05-17
 */
@Mapper
public interface RoleMapper extends BaseMapper<Role> {
	
	List<Role> findRoleByUsername(@Param("loginname") String loginname);
	List<Role> findRoleById(@Param("id") Integer id);
	@Select("select * from sys_role")
	List<Role> findAll();
	Integer findRoleByUid(@Param("uid")Integer uid);
	
	Integer inserRole(@Param("uid")Integer uid,@Param("rid")Integer rid);
    Integer deleteRoleByUid(Integer uid);
    
    public Object setNewUserRole(@Param("uid")Integer uid);

}
